<?php 
session_start();


date_default_timezone_set("Asia/Shanghai");
//系统文件路径,include或者进行文件操作
$project_dir = __DIR__;//blog目录
$lib_dir = $project_dir.DIRECTORY_SEPARATOR.'lib';//lib目录 
$conf_dir = $project_dir.DIRECTORY_SEPARATOR.'config';//config目录 
$plugin = $project_dir.DIRECTORY_SEPARATOR.'plugin';//plugin目录 



//解析config文件
$config = parse_ini_file($conf_dir.DIRECTORY_SEPARATOR.'config.ini');

//获取网路路径,加载图片、js文件、CSS文件、视频文件
define('__PUBLIC__', $config['local'].'/public');//http://www.blog.com/public
define('__PLUGIN__', $config['local'].'/plugin');//http://www.blog.com/plugin

include $lib_dir.DIRECTORY_SEPARATOR.'db.php';

include $lib_dir.DIRECTORY_SEPARATOR.'page.class.php';

$mysql = new MysqlDb($config['host'],$config['user'],$config['pass'],$config['name'],$config['charset']);

//引入函数文件
include $lib_dir.DIRECTORY_SEPARATOR.'/function.php';

